﻿<rb:RibbonWindow x:Class="Notoric.Gui.Windows.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:rb="clr-namespace:Fluent;assembly=Fluent"
        xmlns:ls="clr-namespace:LukasKopenec.LocalizationSupport;assembly=LocalizationSupport"
        xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
        xmlns:wnds="clr-namespace:Notoric.Gui.Windows"
        xmlns:vm="clr-namespace:Notoric.ViewModel;assembly=ViewModel"
        xmlns:vme="clr-namespace:Notoric.ViewModel.Elements;assembly=ViewModel"
        xmlns:cmds="clr-namespace:Notoric.Gui.Commands"
        xmlns:cvr="clr-namespace:Notoric.Gui.Converters"
        xmlns:ctrls="clr-namespace:Notoric.Gui.Controls"
        Title="{ls:Localize Application.Title}" Height="600" Width="800" WindowState="Maximized" Icon="../Notoric32.ico"
        Closing="RibbonWindow_Closing"
        DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"
        KeyDown="RibbonWindow_KeyDown">
    <rb:RibbonWindow.CommandBindings>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.CloseCommand}" Executed="projectExplorerCloseCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.OpenCommand}" Executed="projectExplorerOpenCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.DeleteCommand}" Executed="projectExplorerDeleteCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.NewDirectoryCommand}" Executed="projectExplorerNewDirectoryCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.NewResourceCommand}" Executed="projectExplorerNewResourceCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.NewPageCommand}" Executed="projectExplorerNewPageCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.NewCompositionCommand}" Executed="projectExplorerNewCompositionCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.NewScoreCommand}" Executed="projectExplorerNewScoreCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.RenameCommand}" Executed="projectExplorerRenameCommand_Executed"/>
        <CommandBinding Command="{x:Static vm:ProjectExplorerCommands.EditMetadataCommand}" Executed="projectExplorerEditMetadataCommand_Executed"/>
    </rb:RibbonWindow.CommandBindings>
    <DockPanel LastChildFill="True">
        <rb:Ribbon DockPanel.Dock="Top" x:Name="ribbon">
            <rb:Ribbon.BackstageItems>
                <rb:Button x:Name="newButton"
                           Text="{ls:Localize Ribbon.CommandTitles.AppMenu.NewProject}"
                           Icon="../Resources/Images/Ribbon/Small/New.png"
                           Command="{Binding NewCmd, Mode=OneWay}"
                           rb:KeyTip.Keys="N"
                           />
                <rb:Button x:Name="openButton"
                           Text="{ls:Localize Ribbon.CommandTitles.AppMenu.Open}"
                           Icon="../Resources/Images/Ribbon/Small/Open.png"
                           Command="{Binding OpenCmd, Mode=OneWay}"
                           rb:KeyTip.Keys="O"
                           />
                <rb:Button Text="{ls:Localize Ribbon.CommandTitles.AppMenu.Save}"
                           Command="{Binding SaveCmd, Mode=OneWay}"
                           LargeIcon="../Resources/Images/Ribbon/Large/Save.png"
                           Icon="../Resources/Images/Ribbon/Small/Save.png"
                           x:Name="saveButton"
                           rb:KeyTip.Keys="S"
                           />
                <rb:Button x:Name="saveAsButton"
                           Text="{ls:Localize Ribbon.CommandTitles.AppMenu.SaveAs}"
                           Icon="../Resources/Images/Ribbon/Small/SaveAs.png"
                           LargeIcon="../Resources/Images/Ribbon/Large/SaveAs.png"
                           Command="{Binding SaveAsCmd, Mode=OneWay}"
                           rb:KeyTip.Keys="F"
                           />
                <rb:Button x:Name="closeButton"
                           Text="{ls:Localize Ribbon.CommandTitles.AppMenu.Close}"
                           Command="{Binding CloseCmd, Mode=OneWay}"
                           LargeIcon="../Resources/Images/Ribbon/Large/Close.png" 
                           Icon="../Resources/Images/Ribbon/Small/Close.png"
                           rb:KeyTip.Keys="C"
                           />
                <rb:BackstageTabItem x:Name="RecentFiles_BackstageTab" Header="Recent" rb:KeyTip.Keys="R">
                    <StackPanel Orientation="Vertical" Width="300" Background="White" HorizontalAlignment="Left">
                        <Label Content="Recent Projects" FontSize="22" FontWeight="SemiBold"/>
                        <rb:Gallery x:Name="recentFilesGallery" Background="Transparent" BorderBrush="Transparent"
                                    Width="296" Margin="4" Orientation="Vertical" MinHeight="400"
                                    ItemsSource="{Binding RecentFilesList, Mode=OneWay}" VerticalScrollBarVisibility="Auto" BorderThickness="0" Selectable="False">
                            <rb:Gallery.ItemTemplate>
                                <DataTemplate>
                                    <rb:GalleryItem Command="{Binding Mode=OneWay, Path=OpenCmd, RelativeSource={RelativeSource FindAncestor, AncestorType=wnds:MainWindow, AncestorLevel=1}}" 
                                                    CommandParameter="{Binding}" Click="RecentFilesGalleryItem_Click">
                                        <StackPanel Orientation="Horizontal">
                                            <Image Source="../Resources/Images/Ribbon/Large/MusicSection.png" Width="32" Height="32"/>
                                            <StackPanel Orientation="Vertical">
                                                <TextBlock Text="{Binding Name, Mode=OneWay}"/>
                                                <TextBlock Text="{Binding Path, Mode=OneWay}" Foreground="Gray"/>
                                            </StackPanel>
                                        </StackPanel>
                                    </rb:GalleryItem>
                                </DataTemplate>
                            </rb:Gallery.ItemTemplate>
                        </rb:Gallery>
                    </StackPanel>
                </rb:BackstageTabItem>
                <rb:BackstageTabItem Header="Print" Width="200" rb:KeyTip.Keys="P">
                    <ctrls:PrintBackstageTab/>
                </rb:BackstageTabItem>
                <rb:Button Text="{ls:Localize Ribbon.CommandTitles.AppMenu.CloseApp}"
                           Command="{Binding ExitCmd, Mode=OneWay}"
                           LargeIcon="../Resources/Images/Ribbon/Large/CloseApp.png" 
                           Icon="../Resources/Images/Ribbon/Small/CloseApp.png"
                           rb:KeyTip.Keys="X"
                           />
            </rb:Ribbon.BackstageItems>
            
            <rb:Ribbon.QuickAccessItems>
                <rb:QuickAccessMenuItem IsChecked="True" Target="{Binding ElementName=saveButton}">

                </rb:QuickAccessMenuItem>
                <rb:QuickAccessMenuItem IsChecked="True">
                    <rb:Button Icon="..\Resources\Images\Ribbon\Small\Undo.png" Text="{ls:Localize Ribbon.CommandTitles.Edit.Undo}" x:Name="undoButton"
                               Command="{Binding UndoCmd, Mode=OneWay}">
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding UndoCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding UndoCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding UndoCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                </rb:QuickAccessMenuItem>
                <rb:QuickAccessMenuItem IsChecked="True">
                    <rb:Button Icon="..\Resources\Images\Ribbon\Small\Redo.png" Text="{ls:Localize Ribbon.CommandTitles.Edit.Redo}" x:Name="redoButton"
                               Command="{Binding RedoCmd, Mode=OneWay}">
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding RedoCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding RedoCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding RedoCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                </rb:QuickAccessMenuItem>
            </rb:Ribbon.QuickAccessItems>

            <rb:Ribbon.ContextualGroups>
                <rb:RibbonContextualTabGroup Header="{ls:Localize Ribbon.TabLabels.MusicGroup}" Visibility="Collapsed" x:Name="musicGroup"
                                             Background="Tomato" BorderBrush="Purple">
                </rb:RibbonContextualTabGroup>
                <rb:RibbonContextualTabGroup Header="{ls:Localize Ribbon.TabLabels.ImageGroup}" Visibility="Collapsed" x:Name="imageGroup"
                                             Background="Green" BorderBrush="White"/>
                <rb:RibbonContextualTabGroup Header="{ls:Localize Ribbon.TabLabels.TextGroup}" Visibility="Collapsed" x:Name="textGroup"
                                             Background="Gold" BorderBrush="White"/>
            </rb:Ribbon.ContextualGroups>
            
            <rb:RibbonTabItem Header="{ls:Localize Ribbon.TabLabels.Home}" x:Name="Home_Tab" rb:KeyTip.Keys="H">
                <rb:RibbonGroupBox Header="Sections">
                    <rb:Button Text="Insert Picture From File"
                               LargeIcon="../Resources/Images/Ribbon/Large/Picture.png"
                               Command="{Binding InsertPictureFromFileCmd, Mode=OneWay}"
                               rb:KeyTip.Keys="I"
                               >
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding InsertPictureFromFileCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding InsertPictureFromFileCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding InsertPictureFromFileCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Insert Picture From Resource"
                               LargeIcon="../Resources/Images/Ribbon/Large/InsertPictureFromResources.png"
                               Command="{Binding InsertPictureFromResourceCmd, Mode=OneWay}"
                               rb:KeyTip.Keys="R"
                               >
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding InsertPictureFromResourceCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding InsertPictureFromResourceCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding InsertPictureFromResourceCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Insert Music Section"
                               LargeIcon="../Resources/Images/Ribbon/Large/MusicSection.png"
                               Command="{Binding InsertMusicSectionCmd, Mode=OneWay}"
                               rb:KeyTip.Keys="M"
                               >
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding InsertMusicSectionCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding InsertMusicSectionCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding InsertMusicSectionCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Insert Text Section"
                               LargeIcon="../Resources/Images/Ribbon/Large/TextSection.png"
                               Command="{Binding InsertTextSectionCmd, Mode=OneWay}"
                               rb:KeyTip.Keys="X"
                               >
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding InsertTextSectionCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding InsertTextSectionCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding InsertTextSectionCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Delete Selected Section(s)"
                               LargeIcon="../Resources/Images/Ribbon/Large/Delete.png"
                               Command="{Binding DeleteSectionCmd, Mode=OneWay}"
                               rb:KeyTip.Keys="D"
                               />
                </rb:RibbonGroupBox>
            </rb:RibbonTabItem>
            
            <rb:RibbonTabItem Header="{ls:Localize Ribbon.TabLabels.PageLayout}" rb:KeyTip.Keys="P">
                <rb:RibbonGroupBox Header="{ls:Localize Ribbon.CommandTitles.PageAppearance}" LauncherCommand="{Binding PageAppearanceLauncherCmd, Mode=OneWay}" IsLauncherVisible="True">
                    <rb:RibbonGroupBox.LauncherToolTip>
                        <rb:ScreenTip Title="{Binding PageAppearanceLauncherCmd.ScreenTipTitle, Mode=OneWay}"
                                      Text="{Binding PageAppearanceLauncherCmd.ScreenTipText, Mode=OneWay}"
                                      Image="../Resources/Images/Ribbon/ScreenTips/PageAppearanceDialog.png"
                                      Width="250"/>
                    </rb:RibbonGroupBox.LauncherToolTip>
                    <rb:DropDownButton Text="{ls:Localize Ribbon.CommandTitles.PageAppearance.Orientation}" LargeIcon="../Resources/Images/Ribbon/Large/Orientation.png"
                                       Command="{Binding PageOrientationPortraitCmd, Mode=OneWay}"
                                       rb:KeyTip.Keys="O">
                        <rb:Gallery Orientation="Vertical">
                            <rb:GalleryItem Command="{Binding PageOrientationPortraitCmd, Mode=OneWay}" Width="120" Height="40">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Portrait.png"/>
                                    <TextBlock Text="{ls:Localize Ribbon.CommandTitles.PageAppearance.Orientation.Portrait}" VerticalAlignment="Center"/>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Command="{Binding PageOrientationLandscapeCmd, Mode=OneWay}" Width="120" Height="40">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Landscape.png"/>
                                    <TextBlock Text="{ls:Localize Ribbon.CommandTitles.PageAppearance.Orientation.Landscape}" VerticalAlignment="Center"/>
                                </StackPanel>
                            </rb:GalleryItem>
                        </rb:Gallery>
                        <rb:DropDownButton.ToolTip>
                            <rb:ScreenTip Title="{Binding PageOrientationPortraitCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding PageOrientationPortraitCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding PageOrientationPortraitCmd.DisableReason, Mode=OneWay}"/>
                        </rb:DropDownButton.ToolTip>
                    </rb:DropDownButton>
                    <rb:DropDownButton Text="{ls:Localize Ribbon.CommandTitles.PageAppearance.Sizes}" LargeIcon="../Resources/Images/Ribbon/Large/Sizes.png"
                                       Command="{Binding SetPageSizeCmd, Mode=OneWay}"
                                       rb:KeyTip.Keys="S">
                        <rb:Gallery Orientation="Vertical">
                            <rb:GalleryItem Command="{Binding SetPageSizeCmd, Mode=OneWay}" CommandParameter="210x297" Height="40" Width="150">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Sizes.png" Height="28" Width="28" VerticalAlignment="Center"/>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock Text="A4 210 x 297 mm" FontWeight="Bold"/>
                                        <TextBlock Text="21 cm x 29,7 cm"/>
                                    </StackPanel>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Command="{Binding SetPageSizeCmd, Mode=OneWay}" CommandParameter="148x210" Height="40" Width="150">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Sizes.png" Height="28" Width="28" VerticalAlignment="Center"/>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock Text="A5 148 x 210 mm" FontWeight="Bold"/>
                                        <TextBlock Text="14,8 cm x 21 cm"/>
                                    </StackPanel>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Command="{Binding SetPageSizeCmd, Mode=OneWay}" CommandParameter="105x148" Height="40" Width="150">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Sizes.png" Height="28" Width="28" VerticalAlignment="Center"/>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock Text="A6 105 x 148 mm" FontWeight="Bold"/>
                                        <TextBlock Text="10,5 cm x 14,8 cm"/>
                                    </StackPanel>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Command="{Binding SetPageSizeCmd, Mode=OneWay}" CommandParameter="176x250" Height="40" Width="150">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Sizes.png" Height="28" Width="28" VerticalAlignment="Center"/>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock Text="B5 (ISO) 176 x 250 mm" FontWeight="Bold"/>
                                        <TextBlock Text="17,6 cm x 25 cm"/>
                                    </StackPanel>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Command="{Binding SetPageSizeCmd, Mode=OneWay}" CommandParameter="184,1x266,7" Height="40" Width="150">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Sizes.png" Height="28" Width="28" VerticalAlignment="Center"/>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock Text="Executive 7,25 x 10,5 ''" FontWeight="Bold"/>
                                        <TextBlock Text="18,41 cm x 26,67 cm"/>
                                    </StackPanel>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Command="{Binding SetPageSizeCmd, Mode=OneWay}" CommandParameter="215,9x279,4" Height="40" Width="150">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Sizes.png" Height="28" Width="28" VerticalAlignment="Center"/>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock Text="Letter 8,5 x 11 ''" FontWeight="Bold"/>
                                        <TextBlock Text="21,59 cm x 27,94 cm"/>
                                    </StackPanel>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Command="{Binding SetPageSizeCmd, Mode=OneWay}" CommandParameter="215,9x355,6" Height="40" Width="150">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Sizes.png" Height="28" Width="28" VerticalAlignment="Center"/>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock Text="Legal 8,5 x 14 ''" FontWeight="Bold"/>
                                        <TextBlock Text="21,59 cm x 35,56 cm"/>
                                    </StackPanel>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Command="{Binding SetPageSizeCmd, Mode=OneWay}" CommandParameter="100x150" Height="40" Width="150">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../Resources/Images/Ribbon/Large/Sizes.png" Height="28" Width="28" VerticalAlignment="Center"/>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock Text="10 x 15 cm" FontWeight="Bold"/>
                                        <TextBlock Text="10 cm x 15 cm"/>
                                    </StackPanel>
                                </StackPanel>
                            </rb:GalleryItem>
                        </rb:Gallery>
                        <rb:MenuItem Text="{ls:Localize Ribbon.CommandTitles.PageAppearance.OtherSizes}" Command="{Binding SetPageSizeCmd, Mode=OneWay}"/>
                        <rb:DropDownButton.ToolTip>
                            <rb:ScreenTip Title="{Binding SetPageSizeCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding SetPageSizeCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding SetPageSizeCmd.DisableReason, Mode=OneWay}"/>
                        </rb:DropDownButton.ToolTip>
                    </rb:DropDownButton>
                </rb:RibbonGroupBox>
            </rb:RibbonTabItem>
            
            <rb:RibbonTabItem Header="{ls:Localize Ribbon.TabLabels.CWNotation}" Group="{Binding ElementName=musicGroup}" x:Name="CWMN_Tab" rb:KeyTip.Keys="C">
                <rb:RibbonGroupBox Header="{ls:Localize Ribbon.CommandTitles.NotesRests}">
                    <rb:InRibbonGallery MaxItemsInRow="9" ItemHeight="42" ItemWidth="50" x:Name="NotesRestsGallery" GroupBy="Group" rb:KeyTip.Keys="N">
                        <rb:InRibbonGallery.Filters>
                            <rb:GalleryGroupFilter Title="All" Groups="Notes,Rests" />
                            <rb:GalleryGroupFilter Title="Notes" Groups="Notes" />
                            <rb:GalleryGroupFilter Title="Rests" Groups="Rests" />
                        </rb:InRibbonGallery.Filters>

                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="256">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\BreveNote.png" Height="28" Width="28"/>
                                <TextBlock Text="Breve" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="128">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\WholeNote.png" Height="28" Width="28"/>
                                <TextBlock Text="Whole" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="64">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\HalfNote.png" Height="28" Width="28"/>
                                <TextBlock Text="Half" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="32">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\QuarterNote.png" Height="28" Width="28"/>
                                <TextBlock Text="Quarter" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="16">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\EighthNote.png" Height="28" Width="28"/>
                                <TextBlock Text="8-th" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="8">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\SixteenthNote.png" Height="28" Width="28"/>
                                <TextBlock Text="16-th" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="4">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\ThirtySecondNote.png" Height="28" Width="28"/>
                                <TextBlock Text="32-nd" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="2">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\SixtyFourthNote.png" Height="28" Width="28"/>
                                <TextBlock Text="64-th" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Notes" Command="{Binding InsertNoteCmd, Mode=OneWay}" CommandParameter="1">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\HundredTwentyEighthNote.png" Height="28" Width="28"/>
                                <TextBlock Text="128-th" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="256">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\BreveRest.png" Height="28" Width="28"/>
                                <TextBlock Text="Breve" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="128">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\WholeRest.png" Height="28" Width="28"/>
                                <TextBlock Text="Whole" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="64">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\HalfRest.png" Height="28" Width="28"/>
                                <TextBlock Text="Half" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="32">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\QuarterRest.png" Height="28" Width="28"/>
                                <TextBlock Text="Quarter" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="16">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\EighthRest.png" Height="28" Width="28"/>
                                <TextBlock Text="8-th" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="8">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\SixteenthRest.png" Height="28" Width="28"/>
                                <TextBlock Text="16-th" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="4">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\ThirtySecondRest.png" Height="28" Width="28"/>
                                <TextBlock Text="32-nd" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="2">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\SixtyFourthRest.png" Height="28" Width="28"/>
                                <TextBlock Text="64-th" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                        <rb:GalleryItem Group="Rests" Command="{Binding InsertRestCmd, Mode=OneWay}" CommandParameter="1">
                            <StackPanel Orientation="Vertical">
                                <Image Source="..\Resources\Images\Ribbon\Large\HundredTwentyEighthRest.png" Height="28" Width="28"/>
                                <TextBlock Text="128-th" FontSize="10" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                            </StackPanel>
                        </rb:GalleryItem>
                    </rb:InRibbonGallery>
                    <rb:RibbonToolBar rb:KeyTip.Keys="Z">
                        <rb:RibbonToolBar.LayoutDefinitions>
                            <rb:RibbonToolBarLayoutDefinition RowCount="2">
                                <rb:RibbonToolBarRow>
                                    <rb:RibbonToolBarControlDefinition Target="AccidentalDoubleFlat_Button" Size="Middle"/>
                                    <rb:RibbonToolBarControlDefinition Target="AccidentalFlat_Button" Size="Middle"/>
                                    <rb:RibbonToolBarControlDefinition Target="AccidentalNeutral_Button" Size="Middle"/>
                                    <rb:RibbonToolBarControlDefinition Target="AccidentalDoubleNeutral_Button" Size="Middle"/>
                                    <rb:RibbonToolBarControlDefinition Target="AccidentalSharp_Button" Size="Middle"/>
                                    <rb:RibbonToolBarControlDefinition Target="AccidentalDoubleSharp_Button" Size="Middle"/>
                                </rb:RibbonToolBarRow>
                                <rb:RibbonToolBarRow>
                                    <rb:RibbonToolBarControlDefinition Target="AugmentationDot_Button" Size="Middle"/>
                                    <rb:RibbonToolBarControlDefinition Target="TwoAugmentationDots_Button" Size="Middle"/>
                                    <rb:RibbonToolBarControlDefinition Target="Voice_ComboBox_Label"/>
                                    <rb:RibbonToolBarControlDefinition Target="Voice_ComboBox" Width="50"/>
                                    <rb:RibbonToolBarControlDefinition Target="SymbolInsertionMode_Button" Size="Middle"/>
                                </rb:RibbonToolBarRow>
                            </rb:RibbonToolBarLayoutDefinition>
                        </rb:RibbonToolBar.LayoutDefinitions>

                        <rb:ToggleButton x:Name="AccidentalDoubleFlat_Button" Icon="..\Resources\Images\Ribbon\Large\DoubleFlat.png" GroupName="Accidentals"
                                         Command="{Binding AccidentalCmd, Mode=OneWay}">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding AccidentalCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AccidentalCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AccidentalCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>
                        <rb:ToggleButton x:Name="AccidentalFlat_Button" Icon="..\Resources\Images\Ribbon\Large\Flat.png" GroupName="Accidentals"
                                         Command="{Binding AccidentalCmd, Mode=OneWay}">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding AccidentalCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AccidentalCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AccidentalCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>
                        <rb:ToggleButton x:Name="AccidentalNeutral_Button" Icon="..\Resources\Images\Ribbon\Large\Neutral.png" GroupName="Accidentals"
                                         Command="{Binding AccidentalCmd, Mode=OneWay}">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding AccidentalCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AccidentalCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AccidentalCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>
                        <rb:ToggleButton x:Name="AccidentalDoubleNeutral_Button" Icon="..\Resources\Images\Ribbon\Large\DoubleNeutral.png" GroupName="Accidentals"
                                         Command="{Binding AccidentalCmd, Mode=OneWay}">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding AccidentalCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AccidentalCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AccidentalCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>
                        <rb:ToggleButton x:Name="AccidentalSharp_Button" Icon="..\Resources\Images\Ribbon\Large\Sharp.png" GroupName="Accidentals"
                                         Command="{Binding AccidentalCmd, Mode=OneWay}">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding AccidentalCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AccidentalCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AccidentalCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>
                        <rb:ToggleButton x:Name="AccidentalDoubleSharp_Button" Icon="..\Resources\Images\Ribbon\Large\DoubleSharp.png" GroupName="Accidentals"
                                         Command="{Binding AccidentalCmd, Mode=OneWay}">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding AccidentalCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AccidentalCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AccidentalCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>

                        <rb:ToggleButton x:Name="AugmentationDot_Button" Icon="..\Resources\Images\Ribbon\Large\Dot.png" GroupName="AugmentationDots"
                                         Command="{Binding AugmentationDotsCmd, Mode=OneWay}">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding AugmentationDotsCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AugmentationDotsCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AugmentationDotsCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>
                        <rb:ToggleButton x:Name="TwoAugmentationDots_Button" Icon="..\Resources\Images\Ribbon\Large\DoubleDot.png" GroupName="AugmentationDots"
                                         Command="{Binding AugmentationDotsCmd, Mode=OneWay}"
                                         rb:KeyTip.Keys="T">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding AugmentationDotsCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AugmentationDotsCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AugmentationDotsCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>

                        <Label x:Name="Voice_ComboBox_Label" Content="{ls:Localize Ribbon.CommandTitles.CWNotation.Voice}"/>
                        <rb:ComboBox x:Name="Voice_ComboBox" IsEditable="False" SelectedIndex="0" SelectionChanged="Voice_ComboBox_SelectionChanged">
                            <TextBlock Text="{ls:Localize Ribbon.CommandTitles.CWNotation.AllVoices}"/>
                            <TextBlock Text="1"/>
                            <TextBlock Text="2"/>
                            <TextBlock Text="3"/>
                            <TextBlock Text="4"/>
                            <TextBlock Text="5"/>
                            <TextBlock Text="6"/>
                            <TextBlock Text="7"/>
                            <TextBlock Text="8"/>
                            <TextBlock Text="9"/>
                            <TextBlock Text="10"/>
                            <TextBlock Text="11"/>
                            <TextBlock Text="12"/>
                        </rb:ComboBox>
                        
                        <rb:ToggleButton x:Name="SymbolInsertionMode_Button" Icon="..\Resources\Images\Ribbon\Small\SymbolInsertionMode.png"
                                         Command="{Binding SymbolInsertionModeCmd, Mode=OneWay}">
                            <rb:ToggleButton.ToolTip>
                                <rb:ScreenTip Title="{Binding SymbolInsertionModeCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding SymbolInsertionModeCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding SymbolInsertionModeCmd.DisableReason, Mode=OneWay}"/>
                            </rb:ToggleButton.ToolTip>
                        </rb:ToggleButton>
                    </rb:RibbonToolBar>
                </rb:RibbonGroupBox>
                <rb:RibbonGroupBox Header="Tools">
                    <rb:Button Text="Beam Group" Command="{Binding MakeBeamGroupCmd, Mode=OneWay}" LargeIcon="../Resources/Images/Ribbon/Large/Beam.png"
                               rb:KeyTip.Keys="B">
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding MakeBeamGroupCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding MakeBeamGroupCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding MakeBeamGroupCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Split Beam" Command="{Binding SplitBeamGroupCmd, Mode=OneWay}" LargeIcon="../Resources/Images/Ribbon/Large/SplitBeam.png"
                               rb:KeyTip.Keys="M">
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding SplitBeamGroupCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding SplitBeamGroupCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding SplitBeamGroupCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Slur Notes" Command="{Binding SlurNotesCmd, Mode=OneWay}" LargeIcon="../Resources/Images/Ribbon/Large/Slur.png"
                               rb:KeyTip.Keys="L">
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding SlurNotesCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding SlurNotesCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding SlurNotesCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Stem Up" Command="{Binding SetStemDirectionCmd, Mode=OneWay}" CommandParameter="Up"
                               LargeIcon="../Resources/Images/Ribbon/Large/StemUp.png" rb:KeyTip.Keys="U">
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding SetStemDirectionCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding SetStemDirectionCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding SetStemDirectionCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Stem Down" Command="{Binding SetStemDirectionCmd, Mode=OneWay}" CommandParameter="Down"
                               LargeIcon="../Resources/Images/Ribbon/Large/StemDown.png" rb:KeyTip.Keys="D">
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding SetStemDirectionCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding SetStemDirectionCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding SetStemDirectionCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Time Signature" Command="{Binding ChangeTimeSignatureCmd, Mode=OneWay}"
                               LargeIcon="../Resources/Images/Ribbon/Large/TimeSignature.png" rb:KeyTip.Keys="C"
                               >
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding ChangeTimeSignatureCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding ChangeTimeSignatureCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding ChangeTimeSignatureCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Key Signature" Command="{Binding ChangeKeySignatureCmd, Mode=OneWay}"
                               LargeIcon="../Resources/Images/Ribbon/Large/KeySignature.png" rb:KeyTip.Keys="K">
                        <rb:Button.ToolTip>
                            <rb:ScreenTip Title="{Binding ChangeKeySignatureCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding ChangeKeySignatureCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding ChangeKeySignatureCmd.DisableReason, Mode=OneWay}"/>
                        </rb:Button.ToolTip>
                    </rb:Button>
                    <rb:Button Text="Delete" Command="{Binding RemoveCoreSymbolsCmd, Mode=OneWay}" LargeIcon="../Resources/Images/Ribbon/Large/Delete.png">
                        
                    </rb:Button>
                </rb:RibbonGroupBox>
                <rb:RibbonGroupBox Header="Marks">
                    <rb:DropDownButton Text="Dynamics" LargeIcon="../Resources/Images/Ribbon/Large/DynamicMark.png" rb:KeyTip.Keys="E">
                        <rb:Gallery Orientation="Horizontal" ItemHeight="28" ItemWidth="28">
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="Piano,3">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="¸" />
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="Piano,2">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="¹" />
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="Piano,1">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="p" />
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="MezzoPiano,1">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="P" />
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="MezzoForte,1">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="F" />
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="Forte,1">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="f" />
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="Forte,2">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="Ä" />
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="Forte,3">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="ì" />
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="28" Height="28" Command="{Binding AddDynamicMarkCmd, Mode=OneWay}" CommandParameter="Forzando,1">
                                <TextBlock FontFamily="MusicalSymbols" FontSize="18" Margin="0 -12 0 0" HorizontalAlignment="Center" Text="Z" />
                            </rb:GalleryItem>
                        </rb:Gallery>
                        <rb:DropDownButton.ToolTip>
                            <rb:ScreenTip Title="{Binding AddDynamicMarkCmd.ScreenTipTitle, Mode=OneWay}"
                                        Text="{Binding AddDynamicMarkCmd.ScreenTipText, Mode=OneWay}"
                                        DisableReason="{Binding AddDynamicMarkCmd.DisableReason, Mode=OneWay}"/>
                        </rb:DropDownButton.ToolTip>
                    </rb:DropDownButton>
                    <rb:DropDownButton Text="Dynamics Progress" LargeIcon="../Resources/Images/Ribbon/Large/DynamicsProgress.png" rb:KeyTip.Keys="R">
                        <rb:Gallery ItemWidth="72" ItemHeight="24">
                            <rb:GalleryItem Width="64" Height="24" Group="Text" Command="{Binding AddDynamicsProgressMarkCmd, Mode=OneWay}" CommandParameter="Crescendo,Text">
                                <TextBlock FontFamily="Georgia" FontSize="11" FontStyle="Italic" Text="crescendo"/>
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="64" Height="24" Group="Text" Command="{Binding AddDynamicsProgressMarkCmd, Mode=OneWay}" CommandParameter="Decrescendo,Text">
                                <TextBlock FontFamily="Georgia" FontSize="11" FontStyle="Italic" Text="decrescendo"/>
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="64" Height="24" Group="Text" Command="{Binding AddDynamicsProgressMarkCmd, Mode=OneWay}" CommandParameter="Diminuendo,Text">
                                <TextBlock FontFamily="Georgia" FontSize="11" FontStyle="Italic" Text="diminuendo"/>
                            </rb:GalleryItem>
                        </rb:Gallery>
                        <rb:DropDownButton.ToolTip>
                            <rb:ScreenTip Title="{Binding AddDynamicsProgressMarkCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding AddDynamicsProgressMarkCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding AddDynamicsProgressMarkCmd.DisableReason, Mode=OneWay}"/>
                        </rb:DropDownButton.ToolTip>
                    </rb:DropDownButton>
                </rb:RibbonGroupBox>
                <rb:RibbonGroupBox Header="Symbols">
                    <rb:DropDownButton Text="Insert Clef" LargeIcon="../Resources/Images/Ribbon/Large/Clef.png" rb:KeyTip.Keys="A">
                        <rb:Gallery Orientation="Vertical" ItemWidth="96" ItemHeight="32">
                            <rb:GalleryItem Width="96" Height="32" Group="Clef" Command="{Binding InsertClefCmd, Mode=OneWay}" CommandParameter="TrebleClef">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock FontFamily="MusicalSymbols" FontSize="16" Text="&amp;"/>
                                    <TextBlock FontWeight="Bold" Text="Treble Clef" VerticalAlignment="Center" Margin="8 0 0 0"/>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="96" Height="32" Group="Clef" Command="{Binding InsertClefCmd, Mode=OneWay}" CommandParameter="BassClef">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock FontFamily="MusicalSymbols" FontSize="16" Text="?"/>
                                    <TextBlock FontWeight="Bold" Text="Bass Clef" VerticalAlignment="Center" Margin="8 0 0 0"/>
                                </StackPanel>
                            </rb:GalleryItem>
                            <rb:GalleryItem Width="96" Height="32" Group="Clef" Command="{Binding InsertClefCmd, Mode=OneWay}" CommandParameter="TenoreClef">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock FontFamily="MusicalSymbols" FontSize="16" Text="B"/>
                                    <TextBlock FontWeight="Bold" Text="Tenore Clef" VerticalAlignment="Center" Margin="8 0 0 0"/>
                                </StackPanel>
                            </rb:GalleryItem>
                        </rb:Gallery>
                        <rb:DropDownButton.ToolTip>
                            <rb:ScreenTip Title="{Binding InsertClefCmd.ScreenTipTitle, Mode=OneWay}"
                                          Text="{Binding InsertClefCmd.ScreenTipText, Mode=OneWay}"
                                          DisableReason="{Binding InsertClefCmd.DisableReason, Mode=OneWay}"/>
                        </rb:DropDownButton.ToolTip>
                    </rb:DropDownButton>
                </rb:RibbonGroupBox>
            </rb:RibbonTabItem>

            <rb:RibbonTabItem Header="{ls:Localize Ribbon.TabLabels.ImageTools}" Group="{Binding ElementName=imageGroup}" x:Name="ImageTools_Tab">

            </rb:RibbonTabItem>
            
            <rb:RibbonTabItem Header="{ls:Localize Ribbon.TabLabels.TextTools}" Group="{Binding ElementName=textGroup}" x:Name="TextTools_Tab" rb:KeyTip.Keys="T">
                <rb:RibbonGroupBox Header="Font">
                    <rb:RibbonToolBar>
                        <rb:RibbonToolBar.LayoutDefinitions>
                            <rb:RibbonToolBarLayoutDefinition Size="Large">
                                <rb:RibbonToolBarRow>
                                    <rb:RibbonToolBarControlDefinition Target="comboBoxFontName" Width="75"/>
                                    <rb:RibbonToolBarControlDefinition Target="comboBoxFontSize" Width="45"/>
                                    <rb:RibbonToolBarControlGroupDefinition>
                                        <rb:RibbonToolBarControlDefinition Target="buttonGrowFont"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonShrinkFont"/>
                                    </rb:RibbonToolBarControlGroupDefinition>
                                    <rb:RibbonToolBarControlGroupDefinition>
                                        <rb:RibbonToolBarControlDefinition Target="buttonChangeCase"/>
                                    </rb:RibbonToolBarControlGroupDefinition>
                                    <rb:RibbonToolBarControlGroupDefinition>
                                        <rb:RibbonToolBarControlDefinition Target="buttonClearFormatting"/>
                                    </rb:RibbonToolBarControlGroupDefinition>
                                </rb:RibbonToolBarRow>
                                <rb:RibbonToolBarRow>
                                    <rb:RibbonToolBarControlGroupDefinition>
                                        <rb:RibbonToolBarControlDefinition Target="buttonBold"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonItalic"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonUnderline"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonStrikethrough"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonSubscript"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonSuperscript"/>
                                    </rb:RibbonToolBarControlGroupDefinition>
                                    <rb:RibbonToolBarControlGroupDefinition>
                                        <rb:RibbonToolBarControlDefinition Target="buttonTextEffects"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonTextHighlightColor"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonFontColor"/>
                                    </rb:RibbonToolBarControlGroupDefinition>
                                </rb:RibbonToolBarRow>
                            </rb:RibbonToolBarLayoutDefinition>

                            <rb:RibbonToolBarLayoutDefinition Size="Middle">
                                <rb:RibbonToolBarRow>
                                    <rb:RibbonToolBarControlDefinition Target="comboBoxFontName" Width="125"/>
                                    <rb:RibbonToolBarControlDefinition Target="comboBoxFontSize" Width="50"/>
                                </rb:RibbonToolBarRow>
                                <rb:RibbonToolBarRow>
                                    <rb:RibbonToolBarControlGroupDefinition>
                                        <rb:RibbonToolBarControlDefinition Target="buttonBold"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonItalic"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonUnderline"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonStrikethrough"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonSubscript"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonSuperscript"/>
                                    </rb:RibbonToolBarControlGroupDefinition>
                                </rb:RibbonToolBarRow>
                                <rb:RibbonToolBarRow>
                                    <rb:RibbonToolBarControlGroupDefinition>
                                        <rb:RibbonToolBarControlDefinition Target="buttonGrowFont"/>
                                        <rb:RibbonToolBarControlDefinition Target="buttonShrinkFont"/>
                                    </rb:RibbonToolBarControlGroupDefinition>
                                </rb:RibbonToolBarRow>
                            </rb:RibbonToolBarLayoutDefinition>
                        </rb:RibbonToolBar.LayoutDefinitions>

                        <!--ToolBar Controls-->
                        <rb:ComboBox x:Name="comboBoxFontName" MinWidth="150" Height="22" BorderBrush="Gainsboro" Foreground="#FF222222" 
                                     IsTextSearchEnabled="True" ResizeMode="Vertical" rb:KeyTip.Keys="F"  MenuMinWidth="160" SizeDefinition="Small"
                                     IsEditable="False" SelectionChanged="comboBoxFontName_SelectionChanged">
                            <rb:ComboBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <VirtualizingStackPanel/>
                                </ItemsPanelTemplate>
                            </rb:ComboBox.ItemsPanel>
                            <rb:ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Path=Source, Mode=OneWay}" FontFamily="{Binding Mode=OneWay}">
                                        <TextBlock.ToolTip>
                                            <TextBlock Text="{Binding Path=Source, Mode=OneWay}" />
                                        </TextBlock.ToolTip>
                                    </TextBlock>
                                </DataTemplate>
                            </rb:ComboBox.ItemTemplate>
                        </rb:ComboBox>
                        <rb:ComboBox x:Name="comboBoxFontSize" Width="49" HorizontalAlignment="Left" Height="22" BorderBrush="Gainsboro" 
                                     Foreground="#FF222222" IsEditable="True" SizeDefinition="Small"/>
                        <rb:Button rb:KeyTip.Keys="G" x:Name="buttonGrowFont" Icon="..\Resources\Images\Ribbon\Small\GrowFont.png"  HorizontalAlignment="Left" SizeDefinition="Small"/>
                        <rb:Button x:Name="buttonShrinkFont" Icon="..\Resources\Images\Ribbon\Small\ShrinkFont.png"  HorizontalAlignment="Left" SizeDefinition="Small"
                                   rb:KeyTip.Keys="S"/>
                        <rb:ToggleButton  rb:KeyTip.Keys="1" x:Name="buttonBold" Icon="..\Resources\Images\Ribbon\Small\Bold.png" HorizontalAlignment="Left" SizeDefinition="Small"
                                          Command="{Binding ToggleBoldCmd, Mode=OneWay}"/>
                        <rb:ToggleButton x:Name="buttonItalic" Icon="..\Resources\Images\Ribbon\Small\Italic.png"  HorizontalAlignment="Left" SizeDefinition="Small"
                                         Command="{Binding ToggleItalicCmd, Mode=OneWay}" rb:KeyTip.Keys="2"/>
                        <rb:ToggleButton x:Name="buttonUnderline" Icon="..\Resources\Images\Ribbon\Small\Underline.png"  HorizontalAlignment="Left" SizeDefinition="Small"
                                         Command="{Binding ToggleUnderlineCmd, Mode=OneWay}" rb:KeyTip.Keys="3"/>
                        <rb:ToggleButton x:Name="buttonStrikethrough" Icon="..\Resources\Images\Ribbon\Small\Strikethrough.png" HorizontalAlignment="Left" SizeDefinition="Small"
                                         Command="{Binding ToggleStrikethroughCmd, Mode=OneWay}" rb:KeyTip.Keys="4"/>
                        <rb:ToggleButton x:Name="buttonSubscript" Icon="..\Resources\Images\Ribbon\Small\Subscript.png" HorizontalAlignment="Left" SizeDefinition="Small"
                                         Command="{Binding ToggleSubscriptCmd, Mode=OneWay}" rb:KeyTip.Keys="5"/>
                        <rb:ToggleButton x:Name="buttonSuperscript" Icon="..\Resources\Images\Ribbon\Small\Superscript.png" HorizontalAlignment="Left" SizeDefinition="Small"
                                         Command="{Binding ToggleSuperscriptCmd, Mode=OneWay}" rb:KeyTip.Keys="6"/>
                    </rb:RibbonToolBar>
                </rb:RibbonGroupBox>
            </rb:RibbonTabItem>
            
            <rb:Ribbon.BackstageBrush>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#FF5A78D4" Offset="0" />
                    <GradientStop Color="#FF7495E8" Offset="1" />
                    <GradientStop Color="#FFCDD7F2" Offset="0.5" />
                </LinearGradientBrush>
            </rb:Ribbon.BackstageBrush>
        </rb:Ribbon>
        <StatusBar x:Name="statusBar" DockPanel.Dock="Bottom" Height="30">
            <TextBlock x:Name="statusBarMessage" Text="{Binding Source={x:Static Application.Current}, Path=CurrentState.StatusBarMessage, Mode=OneWay}"/>
        </StatusBar>
        <ad:DockingManager x:Name="dockingManager">
            <ad:ResizingPanel Orientation="Horizontal">
                <ad:DockablePane ad:ResizingPanel.ResizeWidth="250">
                    <wnds:ProjectExplorer x:Name="projectExplorer"/>
                </ad:DockablePane>
                <ad:DocumentPane x:Name="documentPane" SelectionChanged="documentPane_SelectionChanged">
                    
                </ad:DocumentPane>
            </ad:ResizingPanel>
        </ad:DockingManager>
    </DockPanel>
</rb:RibbonWindow>
